﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Lm.Common
{
    public class Time
    {
        public int Hour { get; set; }
        public int Minute { get; set; }
        public int Second { get; set; }

        protected Time()
        { 

        }

        public Time(int hour, int minute, int second)
        {
            this.Hour = hour;
            this.Minute = minute;
            this.Second = second;
        }

        public override bool Equals(object obj)
        {
            return base.Equals(obj);
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        public static bool operator ==(Time a, Time b)
        {
            if (a.Hour == b.Hour && a.Minute == b.Minute && a.Second == b.Second)
            { return true; }
            else
            { return false; }
        }

        public static bool operator !=(Time a, Time b)
        {
            if (a == b)
            { return false; }
            else
            { return true; }
        }

        public static bool operator >(Time a, Time b)
        {
            if (a.Hour > b.Hour)
            { return true; }
            if (a.Hour < b.Hour)
            { return false; }
            if (a.Minute > b.Minute)
            { return true; }
            if (a.Minute < b.Minute)
            { return false; }
            if (a.Second > b.Second)
            { return true; }
            if (a.Second < b.Second)
            { return false; }
            return false;
        }

        public static bool operator <(Time a, Time b)
        {
            return b > a;
        }

        public static bool operator >=(Time a, Time b)
        {
            if (a > b || a == b)
            { return true; }
            else
            { return false; }
        }

        public static bool operator <=(Time a, Time b)
        {
            if (a < b || a == b)
            { return true; }
            else
            { return false; }
        }
    }

}
